#ifndef __SHMIPC_COM_XMESSAGE_ALLOCATOR_H__
#define __SHMIPC_COM_XMESSAGE_ALLOCATOR_H__


#include "shmipc/com/xmessage.h"


namespace shmipc::com {

class XMessageAllocator {
public:
    virtual ~XMessageAllocator() = default;
public:
    virtual core::XResult<XMessageSp> alloc(XMessageType type, MessageId msg_id, uint32_t payload_size, const uint8_t* payload = nullptr);
    virtual core::XResult<XMessageSp> alloc(XMessageType type, MessageId msg_id, SequenceNumber seq_num, uint32_t payload_size, const uint8_t* payload = nullptr);    
};

} //namespace shmipc::com

#endif /** !__SHMIPC_COM_XMESSAGE_ALLOCATOR_H__ */
